package com.hilinos.gb.gb28181.repository;

import com.hilinos.gb.gb28181.repository.mysql.MysqlDeviceRepository;
import com.hilinos.gb.gb28181.repository.mysql.mapper.IDeviceChannelMapper;
import com.hilinos.gb.gb28181.repository.mysql.mapper.IDeviceMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class DeviceRepository {

    @Bean
    public IDeviceRepository iDeviceRepository(IDeviceChannelMapper iDeviceChannelMapper, IDeviceMapper iDeviceMapper) {
        MysqlDeviceRepository mysqlDeviceRepository = new MysqlDeviceRepository();
        mysqlDeviceRepository.setiDeviceMapper(iDeviceMapper);
        mysqlDeviceRepository.setiDeviceChannelMapper(iDeviceChannelMapper);
        return mysqlDeviceRepository;
    }

}
